//C:8.3:sceref.cpp -- defining and using a reference
#include <iostream>

int main(void)
{
    using namespace std;
    int rats = 101;
    int & rodents = rats;    // rodents is a reference
    
    cout << "rats = " << rats;
    cout << ", rodents = " << rodents << '\n';
    
    cout << "rats address = " << &rats;
    cout << ", rodents address " << &rodents << '\n';

    int bunnies = 50;
    rodents = bunnies;    // can we change the reference?
    cout << " bunnies = " << bunnies;                          
    cout << ", rats = " << rats;
    cout << ", rodents = " << rodents << '\n';

    cout << "bunnies address = " << &bunnies;
    cout << ", rodents address = " << &rodents << '\n';
    return 0;
}
